Assignment in Conditional Expression (ACE)

Description:

This is a common error for almost all C programmers. It is very easy to type = instead of == and not all C compilers can detect this situation. Unfortunately, this problem is inherited by C#; the only restriction is that types of operands must be boolean.

Incorrect:

if (x = y) {
    ...
}

Correct:

if (x == y) {
    ...
}